package mysql

import "gorm.io/gorm"

type VipUser struct {
	gorm.Model
	Title   string `gorm:"type:varchar(30);comment:标题;"`
	Price   int64  `gorm:"type:tinyint(10);comment:价格;"`
	Cover   int64  `gorm:"type:tinyint(4);comment:状态;"`
	Status  int64  `gorm:"type:tinyint(4);comment:支付方式0未支付1微信支付2支付宝支付3已支付;"`
	ShopNum string `gorm:"type:varchar(50);comment:订单号;"`
}

func (c *VipUser) FindOneInfoByViper(id int) error {
	return Db.Where("id", id).Limit(1).Find(&c).Error
}

func (c *VipUser) AddViper() error {
	return Db.Create(&c).Error
}
